package cz.mendelu.swi2.skladDilu.controllers;

import org.springframework.web.servlet.ModelAndView;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


import cz.mendelu.swi2.skladDilu.Warehouse;

@Controller
public class CBrowseSkladDiluController
{
	@Autowired   
	private Warehouse warehouse;
	
	@RequestMapping("/skladdilu/browseparts")
	protected ModelAndView handleRequestInternal() throws Exception {
		
        ModelAndView mview = new ModelAndView("skladDilu") ;
        mview.addObject("listDilu", warehouse.getListOfParts()) ;
        mview.addObject("inventura",false);
        return mview ;
	}


  }
